package src;

public class TimeTable {
	
	int[][] timeTable = new int[5][5];
	
	public TimeTable() {
		for (int i=0; i<5; i++) {
			for (int j=0; j<5; j++) {
				this.timeTable[i][j] = 0;
			}
		}
	}
	
	public void setClock(int x, int y, int value) {
		if (x<5 && y<5 && value>0) {
			this.timeTable[x][y] = value;
		} else {
			System.out.println("out of bounds");
		}
	}
	
	// fix this
	public int getClock(int k, int u) {
		return this.timeTable[k][u];
	}

	public String toString() {
		String timetable = "";
		for (int i=0; i<5; i++) {
			for (int j=0; j<5; j++) {
				if ((i!=4)&&(j!=4)) {
					timetable += timeTable[i][j]+",";
				} else {
					timetable += timeTable[i][j];
				}
			}
		}
		return timetable;
	}
	
	public TimeTable readTable(String table) {
		
		
	}
	
	
	
	
	
	
}
